<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    
<ul class="pagination">
   <li class="disabled"><span>上一页</span></li>
   <c:forEach begin="${page.pageNum =1 }" 
   		   end="${page.pageNum+3 > page.pages ? page.pages : page.pageNum+3}" 
   		   var="num">
   	<li class="${page.pageNum==num ? 'active' : '' }"><a href="list?pageNum=${num }">${num }</a></li>
   </c:forEach>
   <li><a href="#!">下一页</a></li>
 </ul>